import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/blog-core/back/tag/list',
    method: 'get',
    params
  })
}

// 添加或更新标签
export function addOrUpdate(data) {
  return request({
    url: '/blog-core/back/tag/addOrUpdate',
    method: 'post',
    data
  })
}

// 删除标签
export function deleteTag(id) {
  return request({
    url: '/blog-core/back/tag/' + id,
    method: 'delete'
  })
}

// 删除多条标签
export function deleteTags(query) {
  return request({
    url: '/blog-core/back/tag/delete',
    method: 'post',
    data: query
  })
}
